package com.gitee.designpattern.singleton.staticinnerclass;

/**
 * @author ming.yan-1
 * @version V1.0
 * @Title com.gitee.designpattern.singleton.staticInnerClass
 * @Description 静态内部类模式
 * @date 2018/8/30  下午5:56
 */
public class Singleton {

    private static class SingletonHolder{
        private static final Singleton singleton = new Singleton();
    }

    private Singleton(){}

    public static final Singleton getInstance(){
        return SingletonHolder.singleton;
    }
}
